package top.haijunit.work.configurer;

import org.redisson.Redisson;
import org.redisson.spring.starter.RedissonAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cache.CacheManager;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisOperations;

/**
 * 远程缓存Redisson
 *
 * @author zhanghaijun
 * @since 2024-08-07
 */
@Configuration
@ConditionalOnClass({Redisson.class, RedisOperations.class})
@ConditionalOnMissingBean(CacheManager.class)
@AutoConfigureAfter(RedissonAutoConfiguration.class)
public class CacheRedisConfigurer {

    //@Value("${spring.cache.type}")
    //private CacheType cacheType;
    //
    //@Bean(name = "redisCacheManager")
    //public CacheManager cacheManager(RedissonClient client) {
    //    return new RedissonSpringCacheManager(client);
    //}


}
